﻿Imports DTO
Imports DAO

Public Class HocSinhBUS

    Public Function LayBang() As DataTable
        Dim dt As New DataTable
        Dim hsDAO As New HocSinhDAO
        dt = hsDAO.LayBang()
        Return dt
    End Function

    Public Function LayDanhSach() As List(Of HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.LayDanhSach
    End Function

    Public Function ThemHocSinh(ByVal hs As HocSinhDTO) As Integer
        Dim hsDao As New HocSinhDAO
        Return hsDao.ThemHocSinh(hs)
    End Function


    Public Function XoaHocSinh(ByVal hsDTO As HocSinhDTO) As Integer
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.XoaHocSinh(hsDTO)
    End Function


    Public Function CapNhatHocSinh(ByVal hsDTO As HocSinhDTO) As Integer
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.CapNhatHocSinh(hsDTO)
    End Function


#Region "TIM KIEM CO BAN"
    Public Function TimKiemTheoTen(ByVal tenhs As String) As List(Of HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.TimKiemTheoTen(tenhs)
    End Function

    Public Function TimKiemTheoDiaChi(ByVal diachi As String) As List(Of HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.TimKiemTheoDiaChi(diachi)
    End Function

    Public Function TimKiemTheoLop(ByVal malop As Integer) As List(Of HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.TimKiemTheoLop(malop)
    End Function
#End Region


    Public Function TimKiemNangCao(ByVal hsCRT As HocSinhCRT) As DataTable
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.TimKiemNangCao(hsCRT)
    End Function

    Public Function LayDanhSachHocSinhTheoLop(ByVal malop As Integer) As List(Of HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        Return hsDAO.LayDanhSachHocSinhTheoLop(malop)
    End Function

   

End Class
